package me.mcx.mcx.service.impl;

import java.util.List;
import me.mcx.common.utils.DateUtils;
import me.mcx.mcx.domain.McxTeam;
import me.mcx.mcx.mapper.McxTeamMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import me.mcx.mcx.service.IMcxTeamService;

/**
 * 团队风采Service业务层处理
 * 
 * @author mcx
 * @date 2024-09-21
 */
@Service
public class McxTeamServiceImpl implements IMcxTeamService 
{
    @Autowired
    private McxTeamMapper mcxTeamMapper;

    /**
     * 查询团队风采
     * 
     * @param id 团队风采主键
     * @return 团队风采
     */
    @Override
    public McxTeam selectMcxTeamById(Long id)
    {
        return mcxTeamMapper.selectMcxTeamById(id);
    }

    /**
     * 查询团队风采列表
     * 
     * @param mcxTeam 团队风采
     * @return 团队风采
     */
    @Override
    public List<McxTeam> selectMcxTeamList(McxTeam mcxTeam)
    {
        return mcxTeamMapper.selectMcxTeamList(mcxTeam);
    }

    /**
     * 新增团队风采
     * 
     * @param mcxTeam 团队风采
     * @return 结果
     */
    @Override
    public int insertMcxTeam(McxTeam mcxTeam)
    {
        mcxTeam.setCreateTime(DateUtils.getNowDate());
        return mcxTeamMapper.insertMcxTeam(mcxTeam);
    }

    /**
     * 修改团队风采
     * 
     * @param mcxTeam 团队风采
     * @return 结果
     */
    @Override
    public int updateMcxTeam(McxTeam mcxTeam)
    {
        mcxTeam.setUpdateTime(DateUtils.getNowDate());
        return mcxTeamMapper.updateMcxTeam(mcxTeam);
    }

    /**
     * 批量删除团队风采
     * 
     * @param ids 需要删除的团队风采主键
     * @return 结果
     */
    @Override
    public int deleteMcxTeamByIds(Long[] ids)
    {
        return mcxTeamMapper.deleteMcxTeamByIds(ids);
    }

    /**
     * 删除团队风采信息
     * 
     * @param id 团队风采主键
     * @return 结果
     */
    @Override
    public int deleteMcxTeamById(Long id)
    {
        return mcxTeamMapper.deleteMcxTeamById(id);
    }
}
